﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using mesoBoard.Web;

namespace mesoBoard.Web.ViewModels
{
    [PropertiesMustMatch("Password", "ConfirmPassword")]
    public class UserRegistration
    {
        //[Range(SiteConfig.UsernameMin.Value, SiteConfig.UsernameMax.Value)]
        [Required]
        public string Username { get; set; }

        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        [Required]
        //[Range(typeof(string), SiteConfig.PasswordMin.Value, SiteConfig.PasswordMax.Value)]
        public string Password { get; set; }

        [Required]
        public string ConfirmPassword { get; set; }

        [Required]
        [RegularExpression("True", ErrorMessage="You must accept the terms of service")]
        public bool Terms { get; set; }
    }
}